package cn.com.duiba.millionaire.center.biz.service;

import cn.com.duiba.millionaire.center.api.dto.MillionaireConsumerDto;

/**
 * Created by zzy on 2018/1/18.
 */
public interface MillionaireConsumerService {

    /**
     * @param consumerId
     * @param appId
     * @return
     */
    MillionaireConsumerDto findByConsumerId(Long consumerId, Long appId, String shareCode);

    MillionaireConsumerDto findByConsumerIdNoCache(Long consumerId, Long appId, String shareCode);

    /**
     * 锁定查询
     * @param consumerId
     * @return
     */
    MillionaireConsumerDto select4Update(long consumerId);

    /**
     * 提现扣款
     * @param consumerId
     * @param changeAmount
     * @return
     */
    boolean withdrawCash(long consumerId, int changeAmount);

    /**
     * 提现失败返还
     * @param consumerId
     * @param changeAmount
     * @return
     */
    boolean withdrawCashPayback(long consumerId, int changeAmount);
}
